package com.aliwo.listener;

import com.aliwo.event.MyTestEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 时间监听器 onApplicationEvent 传入我们的事件.
 *
 * @author Xu Yayuan
 */
@Component
public class MyNoAnnotationListener implements ApplicationListener<MyTestEvent> {
    @Override
    public void onApplicationEvent(MyTestEvent event) {
        System.out.println("非注解监听器：" + event.getMsg());
    }
}
